

<head>
  <meta charset="utf-8">
  <title>myapp</title>
  
</head>

<body>
  {{> nav}}
  {{> body}}
</body>

<template name="body">
    {{loginButtons}}
    {{renderPage}}
    {{#if loggingIn}} 登录中... {{/if}}
</template>
<template name="topics">
  <div class="row">
    {{#each topics}}
    <div class="panel">
      <a href='/t/{{_id}}'>{{title}}</a>
      <p>{{content}}</p>
      <p class="label secondary">{{user.username}}</p>
      <p>发表于{{fromnow created}}</p>
      <div class="label round">{{views}}</div>
      <div class="label round">{{reply_count}}</div>
    </div>
    {{/each}}
    <ul class="pagination">
      <li class="arrow unavailagle"><a href="{{prev_page}}">&laquo;</a></li>
      <li class="current"><a href="javascript:;">1</a></li>
      <li><a href="">2</a></li>
      <li><a href="">3</a></li>
      <li class="unavailable"><a href="">&hellip;</a></li>
      <li><a href="">13</a></li>
      <li class="arrow"><a href="{{next_page}}">&raquo;</a></li>
    </ul>
  </div>
</template>
<template name="topic">
  
    <div class="row">
      <div class="panel">
        {{#each topic}}
        <p>{{title}}</p>
        <p>{{content}}</p>
        {{fromnow created}}
        <div class="label">{{views}}</div>
        <div class="label">{{reply_count}}</div>
        {{/each}}
      </div>
      <div class="row">
        <div class="large-10 columns">
        {{#each replys}}
            <div class="panel">
              <p>{{reply}}</p>
              <p>{{user}} </p>
              <p>{{fromnow created}} </p>
            </div>
        {{/each}}
        </div>
      </div>
    </div>
    <div class="row">
      <div class="large-9">
        <form action="">
          <div class="panel">
            <textarea name="reply" id="" cols="30" rows="10" class="reply"></textarea>
            <input class="button small" type="submit" value="发上去">
          </div>
          
        </form>
      </div>
    </div>

</template>
<template name="post">
  <h1>here is post</h1>
    <div class="row">
      <h2 class="subheader">here is post</h2>
      {{#if errbox}}
      <div class="alert-box">
        <!-- Your content goes here -->
        <p>{{errMsg}}</p>
        <a href="javascript:;" class="close">&times;</a>
      </div>

      {{/if}}
    </div>
    <div class="row">
      <div class="large-4 columns">
        <ul class="pricing-table">
          <li class="title">工具栏</li>
          <li class="price"><p data-tooltip class="has-tip" title="这是一个测试">消息</p> 消息2</li>
          <li class="cta-button"><div class="button small showerr">显示错误</div></li>
          <li class="cta-button"><a href="/new" class="button small" >发帖</a></li>
        </ul>
        {{#if posttitle}}
          hello title
        {{/if}}
        <span data-tooltip="" class="has-tip" data-width="210" data-selector="tooltipntauqpk3xr" title="tip-bottom11">"tip-bottom"</span>
        <!-- <p class="label">{{userid}} </p> -->
        <!-- <p class="label">{{loggingIn}} </p> -->
      </div>
      <div class="large-8 columns">
        {{> topics}}
      </div> 
    </div>
</template>

<template name="nav">
    <nav class="navbar navbar-inverse">
      <div class="navbar-inner">
        <ul class="nav">
          <!-- Title Area -->
          <li class="name">
            <h1><a href="javascript:;">Top Bar Title </a></h1>
          </li>
          <!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone -->
          <li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
        </ul>
      </div>

      <section class="top-bar-section">
        <!-- Left Nav Section -->
        <ul class="left">
          <li class="divider"></li>
          <li class="active"><a href="/" class="tohome">home</a></li>
          <li class="divider"></li>
          <li><a href="/p" class="topost">主题</a></li>
          <li class="divider"></li>
          <li class="divider"></li>
        </ul>
        <ul class="right">
            <li><a href="/new" class="button">发帖</a> </li>
            <!-- <li><div class="button">登录</div> </li> -->
        </ul>

        <!-- Right Nav Section -->
      </section>
    </nav>
</template>
<template name="hello">
    <div class="row">
      <h2 class="subheader">here is home</h2>
    </div>
    <div class="row">
        <div class="large-1 columns">
            <head> 论坛系统</head>
            <ul class="vcard">
                <li>new</li>
                <li>new2</li>
                <li>new3</li>
            </ul>
        </div>
        <div class="large-11 columns">话题列表</div>
    </div>
</template>
<template name="newpost">
  <div class="row">
    <div class="large-6 columns">
      <h2>发表新的内容</h2>
      <!-- <p class="lead">Your couch.  It is mine.</p> -->
      <form>
        <label for="title">标题</label>
        <input name="title" type="text" placeholder="输入一合适的标题">
        <label for="content">内容</label>
        <textarea rows="5" cols="20" name="content" placeholder="内容" style="height: 120px;"></textarea>
        <input type="submit" value="写好了" class="button small">
      </form>
    </div>
  </div>
</template>